Various subjects are discussed throughout this document in the context of a financial application program that displays platform-specific (e.g., Win32®-based) user-interface (UI) controls and UI controls on HTML pages. Principles of the invention, however, are applicable to other types of application programs and other environments and technologies, including, but not limited to Unix-based operating systems, X11/Motif, and Java applets.
Windows® provides several predefined window classes for common controls, such as buttons, check boxes, toolbars, menus, etc. Controls belonging to these window classes are called predefined controls. An application program may create a predefined control of a particular type at run-time (via the CreateWindowEx function) or may create controls as components of a predefined dialog template from a resource file or other source.
Win32®-based applications and HTML pages may use common controls to present information to a computer user. In many cases, the user can modify the information and/or perform commands. For example, a user of a financial application program may press the Print toolbar button to print a report, click an OK button to confirm the deletion of an electronic-bill-payment schedule, or change the check number on a transaction.
Win32®-based applications and HTML pages instruct Windows® which controls to use and where the controls should appear in the dialog or on the page. By default, the visual appearance of the controls is set by Windows®. For example, prior to Windows® XP, buttons were typically shown as black text on a gray background with a 3D border.
Referring to FIG. 1, the first row of buttons shows the default color scheme for the standard buttons provided in Windows® 95, Windows® 98, Windows® ME, and Windows® 2000. Users can change the default visual appearance of Windows via a Display Control Panel Applet, an example of which is shown in FIG. 2. Using such an applet, users can make limited system-wide changes to the default colors, fonts, and styles of UI components.
Referring again to FIG. 1, the second row of buttons shows buttons in the Plum color scheme and the third row shows buttons in the high contrast white color scheme. The bottom row of buttons shows the standard buttons in the Olive color scheme offered by Windows® XP.
In some cases, Win32®-application developers and HTML-page authors may want to go beyond default appearances provided for UI controls, such as the default button-color schemes shown in FIG. 1, and create a unique visual appearance for various UI components.
Developers can set properties on the common controls and let Windows draw the control, or they can write additional code to draw the control themselves. If the developer wants to customize a common control beyond what's currently possible or wants to create a new control, such as a date-edit control with a drop-down calendar, an example of which is shown in FIG. 3, the developer would typically have to write additional code to draw the control as well as handle input messages originating from input devices, such as a keyboard and mouse.
As an example that shows the difference between standard controls and custom controls, compare the dropdown lists and buttons in the Windows® XP Display Control Panel Applet shown in FIG. 2 with the Microsoft® Money 2004 Options dialog shown in FIG. 4. In the Display Control Panel Applet of FIG. 2, the controls have a 3D appearance and in the Money 2004 Options dialog of FIG. 4 the controls appear 2D or “flat.” In the Display Control Panel Applet of FIG. 2, Windows has drawn the user interface controls, and in the Money 2004 Options dialog of FIG. 4, Microsoft® Money has drawn custom controls.
Through setting properties and writing code, Win32®-application developers and HTML-page authors can override the Windows® defaults and customize the visual appearance of their products. The various technologies typically used by Win32®-application developers and HTML-web-page authors are very different, which is unfortunate if it is desired to present HTML- and Win32-based content side-by-side, and to reduce the development and maintenance costs of doing so.
Win32®-application developers typically use Windows® Resource files to specify a list of controls in a dialog and their layout. Developers also typically write the application's source code in C/C++, Visual Basic®, and/or one or more other suitable source-code languages.
HTML offers a limited set of properties that can be changed to modify the visual appearance of common controls. Through clever conventional use of HTML, Cascading Style Sheets (CSS), and JavaScript (TM), HTML-page authors have been able to simulate some user-interface controls such as fly-out menus and tree controls, but these implementations are typically limited and do not offer the same high-fidelity user experience supported by Windows® common controls or custom controls developed by Win32®-application developers. Instead, HTML-page authors use Win32®-based technologies like ActiveX® technologies to create custom controls.
Based on the foregoing discussion, a unifying technology solution that both Win32®-application developers and HTML-page authors can easily use would be desirable.
In addition, when setting properties on conventional UI controls, properties are typically set on individual controls. Being able to set properties on groups of controls would be desirable.